# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py3-python-gssapi
pkgver=1.8.3
pkgrel=0
pkgdesc="A Python interface to RFC 2743/2744 (plus common extensions)"
url="https://github.com/pythongssapi/python-gssapi"
arch="all"
license="ISC"
depends="python3 krb5-dev py3-decorator"
checkdepends="py3-nose py3-k5test py3-parameterized py3-pytest"
makedepends="cython python3-dev py3-gpep517 py3-setuptools py3-setuptools_scm py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/pythongssapi/python-gssapi/releases/download/v$pkgver/python-gssapi-$pkgver.tar.gz"
builddir="$srcdir"/python-gssapi-$pkgver
options="!check" # fail to find self for some reason

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
f08a318beac4b2807f33f5c30ccdafeafed0971537456a477138fe783f7fd9f05ab59cff74030c3041504302b0922307e5c391cd5d0e8b4f370f0036a5ef45b8  python-gssapi-1.8.3.tar.gz
"
